package com.shopmall.service;

import com.shopmall.mapper.AdminRecordMapper;
import com.shopmall.pojo.AdminRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service  //!!！这个注解绝对不能少
@Transactional
public class AdminRecordServiceImpl implements AdminRecordService{

    @Autowired
    AdminRecordMapper adminRecordMapper;

    @Override
    public List<AdminRecord> queryRecord() {
        return adminRecordMapper.queryRecord();
    }

    @Override
    public int addRecord(AdminRecord adminRecord) {
        return adminRecordMapper.addRecord(adminRecord);
    }

    @Override
    public int deleteRecord(int record_id) {
        return adminRecordMapper.deleteRecord(record_id);
    }

}
